And: logic and
The command sets cf = of = 0. The result affects SF, ZF, and PF. Command Format: and R/m, R/M/I
; Test22_1.asm-use and to clear the second and fourth digits of a number. 386. model flat, stdcallinclude windows. incinclude
due to contact with the lower level of data processing to the following use of finishing (reference network)bit arithmeticThe Operation component of a bitwise operation can only be integer or character data, and the bitwise operation considers the
bit arithmeticThe operation component of a bitwise operation can only be integer or character data, and the bitwise operation considers the operand as a bit string information composed of binary bits, and completes the specified operation by bit,
PHP/*There are 4 bit operations in the *php, respectively, & and | or ^ XOR ~ Take counter & two bits are all 1, the result is that 1| has one for 1, the result is 1^ one is 0, one is 1, the result is 1~ take anti-0->1,1->01. The highest bit of the
XOR, as the name implies, the same take 0, different take 1, XOR or operation has a binding law. There are two classic applications on the algorithm, one is to exchange two numbers, and the other is to find out the number of single-drop.
1. Exchange
Bitwise -AND Operator (&)Participate in the operation of the two data, press bits for "and" operation.Arithmetic Rules:0&0=0; 0&1=0; 1&0=0; 1&1=1; that is, the two-bit is "1" at the same time, the result is "1", otherwise 0For example: 3&5 is 0
Reprinted from: Http://www.jb51.net/article/40559.htm, thanks to the original author.The following are the bit operators in C: With, or, XOR, inverse, left and right shift are described in detail, the need for friends can come to the referenceA
Language bitwise operators: With, OR, XOR, reverse, move left, and rightA bitwise operation is a binary-based operation. In system software, it is often necessary to deal with bits problems. The C language provides 6 bit manipulation operators.
Turn... Bit operations in C #, non-logical ~, Logical and &, logical or |, logical XOR or ^, logical left shift
In C #, we will use in-place operations. For example, to determine whether a number is the power of 2, how to determine whether a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.